import dayjs from 'dayjs'
// dayjs 默认不支持utc，需要自行导入utc并注册
import utc from 'dayjs/plugin/utc'
dayjs.extend(utc)

export function formatUtcString(
  utcString: string,
  format: string = 'YYYY-MM-DD HH:mm:ss'
): string {
  return dayjs.utc(utcString).format(format)
}
